package com.zhizhi.util;


import com.zhizhi.handle.ParamException;

/**
*
* @Author Mr.Yu
* @Date 2020/8/5 23:44
* @Description 断言机制
**/
public class AssertUtil {

    public static void isTrue(Boolean flag,String msg){
        if(flag){
            throw new ParamException(msg);
        }
    }

    public static  void isTrue(Boolean flag,String msg,Integer code){
        if(flag){
            throw new ParamException(code,msg);
        }
    }
}
